<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/wikiRanking',
    'namespace' => 'Beerus\\Modules\\WikiRanking\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    #全品类  榜单期号
    $router->get('/checkCateRank/{day}/{type}', 'CheckRankingController@cateRankList');


    $router->post('/sort', 'RankingConfigController@sort');
    $router->post('/index/{firstId}/sort', 'RankingConfigController@sort');
    $router->get('/index', 'RankingConfigController@list');
    #创建一级榜单
    $router->get('/index/create', 'RankingConfigController@firstEdit');
    #编辑一级榜单
    $router->get('/index/{firstId}/edit', 'RankingConfigController@firstEdit');
    #删除一级榜单
    $router->delete('/index/{firstId}', 'RankingConfigController@delConfig');
    #显示不显示一级榜单
    $router->put('/index/{firstId}', 'RankingConfigController@switchConfigState');
    #保存一级榜单
    $router->post('/index/{firstId}/save', 'RankingConfigController@saveFirst');
    #创建二级榜单
    $router->get('/index/{firstId}/edit/create', 'RankingConfigController@childRankingEdit');
    #编辑二级榜单
    $router->get('/index/{firstId}/edit/{secondId}/edit', 'RankingConfigController@childRankingEdit');
    #显示不显示二级榜单
    $router->put('/index/{firstId}/edit/{secondId}', 'RankingConfigController@switchConfigState');
    #删除二级榜单
    $router->delete('/index/{firstId}/edit/{secondId}', 'RankingConfigController@delConfig');
    #保存二级榜单
    $router->post('/index/{firstId}/edit/{secondId}/save', 'RankingConfigController@saveSecond');
    #关联二级榜单
    $router->get('/index/{firstId}/{secondId}/relate', 'RankingConfigController@relate');
    $router->post('/index/{firstId}/{secondId}/relate/save', 'RankingConfigController@relateSave');

    $router->get('/checkRank/index', 'CheckRankingController@list');
    #榜单期号
    $router->get('/checkRank/rankList/{ranking_day}', 'CheckRankingController@rankList');
    #当前榜单信息
    $router->get('/checkRank/rankList/{ranking_day}/{firstRank}', 'CheckRankingController@rankList');
    #当前榜单信息
    $router->get('/checkRank/rankList/{ranking_day}/{firstRank}/{secondRank}', 'CheckRankingController@rankList');
    #当前榜单信息
    $router->get('/checkRank/rankList/{ranking_day}/{firstRank}/{secondRank}/{type}', 'CheckRankingController@rankList');
    #当前榜单信息
    $router->post('/checkRank/postedit', 'CheckRankingController@postedit');
    #编辑榜单信息
    $router->get('/checkRank/editBasic/{ranking_day}/{id}/{type}', 'CheckRankingController@editBasic');
    #编辑榜单信息
    $router->post('/checkRank/delRankList/{ranking_day}/{id}/{type}', 'CheckRankingController@delRankList');
    #踢出榜单

    $router->get('checkRank/editNote/{id}', 'CheckRankingController@editNote');
    $router->post('/checkRank/postNote', 'CheckRankingController@postNote');


  //  $router->get('/checkRank/editBasic/{ranking_day}/{id}/{type}/{basic_id}', 'CheckRankingController@editBasic');
    #编辑榜单信息
    $router->get('/checkRank/basicPic/{basic_id}', 'CheckRankingController@basicPic');
    #踢出榜单
    $router->post('/checkRank/saveBasicPic', 'CheckRankingController@saveBasicPic');
    $router->post('/checkRank/trashBasicPic/{basic_id}', 'CheckRankingController@trashBasicPic');
    #设置为榜单封面或取消
    $router->post('/checkRank/setRankingCover/{id}', 'CheckRankingController@setRankingCover');





});